package com.zy.controller;


import com.zy.service.UserService;
import com.zy.service.form.Message;
import com.zy.service.form.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * Created by ab804 on 2015/9/25 0025.
 */
@RestController
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping(value = "/addUser.do", method = RequestMethod.POST)
    public Message addUser(@Valid UserInfo userInfo) {

        return userService.addUser(userInfo);
    }
}
